<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>重置登录密码</title>
    <!-- bootstrap & fontawesome -->
    <link rel="stylesheet" href="../../assets/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="../../assets/font-awesome/4.5.0/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="../../assets/css/ace.min.css" class="ace-main-stylesheet" id="main-ace-style"/>
   <link rel="stylesheet" href="../../assets/css/admin.css">
    <link rel="stylesheet" href="../../assets/css/login/member.css">
</head>
<body>
<div class="head">
    <div class="header">
        <div class="header-cnt fn-clear">
            <h1 class="logo">
                <a href="" class="logo-img logo-img-jx" title="激想云商零售管理">
                    激想云商零售管理
                </a>
            </h1>
            <h2 class="logo-title">
                找回密码
            </h2>
            <ul class="jx-nav">
                <li class="nav-first">
                    <a href="../index.html">注册</a>
                </li>
                <li class="nav-last">
                    <a href="../index.html" target="_blank" seed="nav-link-advice">前往登录</a>
                </li>
            </ul>
        </div>
    </div>
</div>
<div class="container">
    <div class="content">
        <div class="maincenter maincenter-box">
            <div id="fuelux-wizard-container">
                <div class="steps-container" style="padding-bottom: 30px">
                    <ul class="steps">
                        <li data-step="1" class="active">
                            <span class="step">1</span>
                            <span class="title">验证身份</span>
                        </li>

                        <li data-step="2">
                            <span class="step">2</span>
                            <span class="title">重置登录密码</span>
                        </li>

                        <li data-step="3">
                            <span class="step">3</span>
                            <span class="title">重置成功</span>
                        </li>

                    </ul>
                </div>
                <div class=" step-content pos-rel">
                    <div class="step-pane active" data-step="1">
                        <div class="maincenter-box-tip dashed">
                            <p class="ui-tiptext ui-tiptext-message"><span class="ui-tiptext-icon"></span>您正在使用 “<span
                                    class="strong">电子邮箱</span>” 请完成以下操作：</p>
                        </div>
                        <div class="text-center pt-50 ft-16">
                            <span>邮件已发送到您的邮箱 tin***@groupjx.com 。请按邮箱中的提示操作，完成身份验证。</span>
                        </div>
                        <div class="dashed"></div>
                        <div class="pl-50 line-height-200">
                            <p class="ft-12b">一直没有收到邮件？</p>
                            <p>请先检查是否在垃圾邮件中。如果还未收到，请
                                <button>点击重新发送邮件</button>
                            </p>
                            <p>还是收不到？请
                                <a href="./queryStrategy.html">选择其他验证方式</a></p></div>
                    </div>
                    <div class="step-pane" data-step="2">
                        <form class="form-horizontal ui-form" id="pwdForm">
                            <div class="ui-form-item">
                                <label class="ui-label ui-label-reset">账户名</label>
                                <p class="ui-form-text"><span class="ui-text-amount">insin.***@groupjx.com</span></p>
                            </div>
                            <div class="ui-form-item">
                                <label class="ui-label">新登录密码</label>
                                <input type="password" id="password_input" name="password"
                                       class="ui-input i-text" oncontextmenu="return false" onpaste="return false"
                                       oncopy="return false" oncut="return false" autocomplete="off" value=""
                                       placeholder="请输入密码">
                                <div class="ui-form-explain"><i class="fa fa-times-circle ui-form-icon"
                                                                aria-hidden="true"></i><span>必须是8-20位英文字母、数字或符号，不能是纯数字</span>
                                </div>
                            </div>
                            <div class="ui-form-item">
                                <label class="ui-label">确认新登录密码</label>
                                <input type="password" id="rePassword_input" name="rePassword"
                                       class="ui-input i-text" oncontextmenu="return false" onpaste="return false"
                                       oncopy="return false" oncut="return false" autocomplete="off" value=""
                                       placeholder="请重复输入密码">
                                <div class="ui-form-explain"><i class="fa fa-times-circle ui-form-icon"
                                                                aria-hidden="true"></i><span></span>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="step-pane" data-step="3">
                        <div class="text-center" style="padding-top: 50px">
                            <p class="ui-tiptext ui-tiptext-message">设置成功，请牢记新的登录密码</p>

                        </div>
                    </div>
                </div>
            </div>

            <div class="wizard-actions" style="text-align: left">
                <div class="ui-form-item ui-form-item-last">
                    <div class="ui-button ui-button-morange" id="J-submit-btn">
                        <input type="button" id="nextBtn" value="下一步" class="ui-button-text btn-next">
                        <input type="button" id="backBtn" value="返回登录界面" class="ui-button-text fn-hide">
                    </div>
                </div>

            </div>
        </div>
        <!-- /.widget-main -->
    </div>
    <!-- /.widget-body -->
</div>
<div class="footer">
    <div class="footer-inner">
        <div class="footer-content">
            沪ICP备15052275号-2
        </div>
    </div>
</div>
<!--[if !IE]> -->
<script src="../../assets/js/jquery-2.1.4.min.js"></script>
<!-- <![endif]-->
<!--[if IE]>
<script src="../../assets/js/jquery-1.11.3.min.js"></script>
<![endif]-->
<script src="../../assets/js/bootstrap.min.js"></script>
<!-- page specific plugin scripts -->
<script src="../../assets/js/wizard.min.js"></script>
<script src="../../assets/js/jquery.validate.min.js"></script>
<!-- ace scripts -->
<script src="../../assets/js/ace-elements.min.js"></script>
<script src="../../assets/js/ace.min.js"></script>
</body>
<script>
    $(function () {
        $("#backBtn").click(function () {
            window.location = '../index.html';
        });
        var $validation = true;
        //初始化对象
        $('#fuelux-wizard-container').ace_wizard({/*step: 2, direction: 'next'*/})
            .on('actionclicked.fu.wizard', function (e, info) {
                if (info.step == 2 && $validation) {
                    if (!$('#pwdForm').valid()) e.preventDefault();
                }
            }).on('changed.fu.wizard', function (e, data) {
            if (data.step == 3) {
                $("#nextBtn").parents(".ui-form-item").addClass("modifyPadding");
                $("#nextBtn").hide().siblings().show();
            }
            //重新选择验证方式隐藏
            $(".ui-form-other").hide();
        })
            .on('finished.fu.wizard', function (e) {
            }).on('stepclick.fu.wizard', function (e) {
            //e.preventDefault();//this will prevent clicking and selecting steps
        });
        var item = $('#fuelux-wizard-container').wizard('selectedItem');
        console.log(item.step);
        if (item.step == 1) {
            $(".wizard-actions").hide();
        }
        //表单验证
        $("#pwdForm").validate({
           /* onkeyup: function (element, event) {
             //去除左侧空格
             var value = this.elementValue(element).replace(/^\s+/g, "");
             $(element).val(value);
             },*/
            onfocusout: function (element, event) {
                var value = this.elementValue(element).replace(/\s|\xA0/g,"");
                $(element).val(value);
            },
            errorPlacement: function (error, element) {
                error.replaceAll(element.next().find("span"));
            },
            rules: {
                password: {
                    required: true,
                    minlength: 8
                },
                rePassword: {
                    required: true,
                    equalTo: "#password_input"
                }
            },
            messages: {
                password: {
                    required: "请输入密码",
                    minlength: "密码至少八位",
                },
                rePassword: {
                    required: "请重复输入新密码",
                    equalTo: "输入新密码不一致"
                }
            },
            highlight: function (e) {
                $(e).closest('.ui-form-item').addClass('ui-form-item-error');
            },
            success: function (e) {
                $(e).closest('.ui-form-item').removeClass('ui-form-item-error');
            },
            submitHandler: function (form) {

            },
            invalidHandler: function (form) {
            }
        });
    })
</script>
</html>